﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MacomberMapSystem.Common.Database;
using MacomberMapSystem.Common.CIM;
using MacomberMapSystem.Common.Serialization;
using WeifenLuo.WinFormsUI.Docking;

namespace MacomberMapSystem.Common.User_Interfaces.One_Lines
{
    /// <summary>
    /// This class acts as a simple holder for the one-line editor
    /// </summary>
    public partial class frmOneLineEditor : DockContent
    {
        #region Initialization
        /// <summary>
        /// Initialize a new one-line editor
        /// </summary>
        /// <param name="ActiveOneLine"></param>
        /// <param name="ActiveModel"></param>
        /// <param name="BaseElement"></param>
        /// <param name="Repository"></param>
        public frmOneLineEditor(MM_Database_OneLine ActiveOneLine, MM_Database_Model ActiveModel, CIM_Element BaseElement, MM_Repository Repository)
        {
            InitializeComponent();
            ctlEditor.LoadOneLine(ActiveOneLine, ActiveModel, BaseElement,null, Repository);
            this.Text = "One-Line Editor: " + BaseElement.Name;
            this.DoubleBuffered = true;
        }

        /// <summary>
        /// Initialize a new one-line editor
        /// </summary>
        /// <param name="ActiveOneLine"></param>
        /// <param name="ActiveModel"></param>
        /// <param name="BaseElement"></param>
        /// <param name="Assignment"></param>
        /// <param name="Repository"></param>
        public frmOneLineEditor(MM_Database_OneLine ActiveOneLine, MM_Database_Model ActiveModel, CIM_Element BaseElement, MM_Database_Assignment Assignment, MM_Repository Repository)
        {
            InitializeComponent();
            ctlEditor.LoadOneLine(ActiveOneLine, ActiveModel, BaseElement, Assignment,Repository);
            this.Text = "One-Line Editor: " + BaseElement.Name;
        }

        #endregion

     
    }
}
